package com.study.stream;

public class User {
    private Integer id;
    private String name;
    private Integer age;
    private Integer gender;
    private Integer num=0;
    public User() {
    }

    public User(Integer id, String name, Integer age, Integer gender) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public Integer getAge() {
        System.out.println(id+"  "+ ++num);
        return age;
    }

    public Integer getGender() {
        System.out.println(id+"  "+ ++num);
        return gender;
    }

    public Integer getId() {
        System.out.println(id+"  "+ ++num);
        return id;
    }

    public String getName() {
        return name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }
}
